package com.itcam.cm.manager.controller;

import com.itcam.cm.manager.service.BrandService;
import com.itcam.cm.manager.service.OrderStatisticsService;
import com.itcam.cm.model.dto.order.OrderStatisticsDto;
import com.itcam.cm.model.entity.order.OrderStatistics;
import com.itcam.cm.model.entity.product.Brand;
import com.itcam.cm.model.vo.common.Result;
import com.itcam.cm.model.vo.order.OrderStatisticsVo;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping(value="/admin/order/orderInfo")
@CrossOrigin(allowCredentials = "true" , originPatterns = "*" , allowedHeaders = "*")
public class OrderInfoController {

    @Autowired
    private OrderStatisticsService orderStatisticsService ;


    @GetMapping("getOrderStatisticsData")
    public Result<OrderStatisticsVo> getOrderStatisticsData(OrderStatisticsDto orderStatisticsDto){
        OrderStatisticsVo orderStatisticsVo = orderStatisticsService.getOrderStatisticsData(orderStatisticsDto);
        return Result.ok(orderStatisticsVo);
    }


}